package com.ruoyi.qiushi.service.system.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.qiushi.domain.system.QiushiFeedback;
import com.ruoyi.qiushi.mapper.system.QiushiFeedbackMapper;
import com.ruoyi.qiushi.service.system.IQiushiFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 意见反馈Service业务层处理
 *
 * @author ruoyi
 * @date 2023-12-28
 */
@Service
public class QiushiFeedbackServiceImpl implements IQiushiFeedbackService {
    @Autowired
    private QiushiFeedbackMapper qiushiFeedbackMapper;

    /**
     * 查询意见反馈
     *
     * @param id 意见反馈主键
     * @return 意见反馈
     */
    @Override
    public QiushiFeedback selectQiushiFeedbackById(Long id) {
        return qiushiFeedbackMapper.selectQiushiFeedbackById(id);
    }

    /**
     * 查询意见反馈列表
     *
     * @param qiushiFeedback 意见反馈
     * @return 意见反馈
     */
    @Override
    public List<QiushiFeedback> selectQiushiFeedbackList(QiushiFeedback qiushiFeedback) {
        return qiushiFeedbackMapper.selectQiushiFeedbackList(qiushiFeedback);
    }

    /**
     * 新增意见反馈
     *
     * @param qiushiFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int insertQiushiFeedback(QiushiFeedback qiushiFeedback) {
        qiushiFeedback.setCreateTime(DateUtils.getNowDate());
        return qiushiFeedbackMapper.insertQiushiFeedback(qiushiFeedback);
    }

    /**
     * 修改意见反馈
     *
     * @param qiushiFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int updateQiushiFeedback(QiushiFeedback qiushiFeedback) {
        qiushiFeedback.setUpdateTime(DateUtils.getNowDate());
        return qiushiFeedbackMapper.updateQiushiFeedback(qiushiFeedback);
    }

    /**
     * 删除意见反馈信息
     *
     * @param id 意见反馈主键
     * @return 结果
     */
    @Override
    public int deleteQiushiFeedbackById(Long id) {
        return qiushiFeedbackMapper.deleteQiushiFeedbackById(id);
    }
}
